
#pragma once

#include <IReferenceCounted.h>
using namespace irr;

namespace Irrlicht
{
	namespace Net
	{
		public ref class ReferenceCounted
		{
		private:
			IReferenceCounted* insider;

		public:
			ReferenceCounted()
			{
				insider = new IReferenceCounted();
			}
			ReferenceCounted(IReferenceCounted* irc)
			{
				insider = irc;
			}

			~ReferenceCounted()
			{
				delete insider;
			}

			void Grab()
			{
				insider->grab();
			}
			void Drop()
			{
				insider->drop();
			}

			int GetReferenceCount()
			{
				return insider->getReferenceCount();
			}
			String^ GetDebugName()
			{
				return gcnew String(insider->getDebugName());
			}
		};
	}
}